home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-04-25 | 3.4 KB | 123 lines | [TEXT/MPS ] |
- //========================================================================================
- //
- // File: FWPasta.h
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //========================================================================================
- #ifndef FWPASTA_H
- #define FWPASTA_H
-
- // ----- Framework Includes -----
-
- #ifndef FWPRTDEF_H
- #include "FWPrtDef.h"
- #endif
-
- // ----- Foundation Includes -----
-
- #ifndef FWSTDDEF_H
- #include "FWStdDef.h"
- #endif
-
- #ifndef FWRUNTYP_H
- #include "FWRunTyp.h"
- #endif
-
- // ----- OpenDoc Includes -----
-
- #ifndef FWODTYPS_H
- #include "FWODTyps.h"
- #endif
-
- //========================================================================================
- // Forward Declarations
- //========================================================================================
-
- class ODStorageUnit;
- class FW_CFrame;
- class FW_CLinkDestination;
-
- //========================================================================================
- // class FW_MPasteAsHandler
- //========================================================================================
-
- class FW_MPasteAsHandler
- {
- //----------------------------------------------------------------------------------------
- // Constructor/Destructors
- //
- public:
- FW_MPasteAsHandler(Environment *ev, FW_CFrame* frame);
-
- virtual ~ FW_MPasteAsHandler();
-
- //----------------------------------------------------------------------------------------
- // Public API
- //
- public:
- FW_Boolean HandleDropPasteAsDialog(Environment* ev,
- ODStorageUnit* dropSU,
- FW_Boolean& handledDrop); // drag&drop version
-
- FW_Boolean HandlePasteAsDialog(Environment* ev,
- ODCloneKind cloneKind,
- FW_Boolean& handledIt); // clipboard version
-
- FW_Boolean WantsEmbedAs(Environment* ev) const;
- FW_Boolean WantsTranslation(Environment* ev) const;
-
- FW_CLinkDestination* GetNewLink(Environment* ev) const;
- ODPasteAsResult* GetEmbedInfoPtr(Environment* ev);
-
- //----------------------------------------------------------------------------------------
- // Private API
- //
- private:
- FW_Boolean PostPasteAsDialog(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_EStorageKinds storageKind,
- ODCloneKind cloneKind,
- FW_Boolean& handledIt);
-
- FW_Boolean PasteAsEmbed(Environment* ev,
- ODStorageUnit* storageUnit,
- FW_EStorageKinds storageKind,
- ODCloneKind cloneKind);
-
- private:
- FW_CLinkDestination* fNewLink; // NULL if no link created
- ODPasteAsResult fEmbedInfo;
- FW_CFrame* fPrivFrame;
- };
-
- //========================================================================================
- // Inlines
- //========================================================================================
-
- inline ODPasteAsResult* FW_MPasteAsHandler::GetEmbedInfoPtr(Environment*)
- {
- return &fEmbedInfo;
- }
-
- //----------------------------------------------------------------------------------------
- inline FW_CLinkDestination* FW_MPasteAsHandler::GetNewLink(Environment*) const
- {
- return fNewLink;
- }
-
- //----------------------------------------------------------------------------------------
- inline FW_Boolean FW_MPasteAsHandler::WantsEmbedAs(Environment*) const
- {
- return (fEmbedInfo.mergeSetting == FALSE);
- }
-
- //----------------------------------------------------------------------------------------
- inline FW_Boolean FW_MPasteAsHandler::WantsTranslation(Environment*) const
- {
- return (fEmbedInfo.translateKind != NULL);
- }
-
- #endif
-